<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>

</body>
</html>

<script>
	// var sum = 0;
	// var i=0;
	// while(i<100){
	// 	i++;
	// 	sum+=i;
		

	// }
	// document.write(sum);
	var sum = 0;
	var i = 1;
	while(i<=100){
		//如果i是奇数就是加上1/i，如果i是偶数就减去1/i;
		if (i%2==0) {
			sum-=1/i;
		}else{
			sum+=1/i;
		}
		i++;
	}
	document.write(sum)
</script>